package com.lottery.game.common.utils;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationContext;

/**
 * @Description spring上下文
 * @Classname SpringApplicationContext
 * @Date 2019/4/12 9:52
 * @Author liusc <liushicheng1993@vip.qq.com>
 * @Version 1.0
 */
@Slf4j
public class SpringApplicationContext {

    private static SpringApplicationContext me = new SpringApplicationContext();
    /**spring上下文对象*/
    private ApplicationContext applicationContext;
    public SpringApplicationContext(){}

    /**
     * 获取当前applicationContext
     * @return
     */
    public static ApplicationContext getApplicationContext() {
        return me.applicationContext;
    }
    /**
     * 设置当前applicationContext
     * @param applicationContext
     */
    public static void setApplicationContext(ApplicationContext applicationContext) {
        me.applicationContext = applicationContext;
    }
}
